<extend name="./Public/base.html" />
<block name="title">
 <?php
    $type = '添加';
    if(isset($edit) && !empty($edit)){
        $type = '修改';
    }
 ?>
    {$type}用户
</block>
<block name="body">
     <div class="clearfix well-sm">
        <ol class="breadcrumb pull-left">
          <li><a href="{:U('Index/index')}">首页</a></li>
          <li><a href="{:U('index',array('p'=>$page,'rows'=>$rows))}">用户列表</a></li>
          <li><a href="javascript:">{$type}用户</a></li>
        </ol>
        <a class='btn btn-primary btn-wide pull-right' href="{:U('index',array('p'=>$page,'rows'=>$rows))}" >返回用户列表</a>
    </div>
    <form action="{:U('action')}"  method="post" class="form-horizontal" >
        <div class='form-group'>
    <label for='name_input' class='col-lg-2 control-label'>用户名</label>
    <div class='col-lg-9'>        <input class='form-control' type='text' name='name' id='name'_input value='{$UserData.name}' />
    </div></div>
<div class='form-group'>
    <label for='pwd_input' class='col-lg-2 control-label'>密码</label>
    <div class='col-lg-9'>        <input class='form-control' type='password' name='pwd' id='pwd'_input value='{$UserData.pwd}' />
    </div></div>
<div class='form-group'>
    <label for='email_input' class='col-lg-2 control-label'>邮箱</label>
    <div class='col-lg-9'>        <input class='form-control' type='email' name='email' id='email'_input value='{$UserData.email}' />
    </div></div>
<div class='form-group text-center'>
    <input class='btn btn-primary btn-wide' type='submit' value='&nbsp;保存{$type}' />
</div>

        <if condition="$edit">
            <input type="hidden" name="id" value="{$UserData.id}" />
        </if>
    </form>
</block>